//
//  EventViewController.h
//  lvtu
//
//  Created by Apple on 12-4-4.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseViewController.h"
#import "NetDataSource.h"
#import "DataSource.h"
#import "DataPartView.h"
#import "EGORefreshTableHeaderView.h"

@protocol AddEventCellProtocol <NSObject>

//图片点击处理代理方法
- (BOOL)addEvent:(PlaceInfo*)info type:(ElementType)type;
- (BOOL)delEvent:(PlaceInfo*)info type:(ElementType)type;

@end

@interface EventViewController : BaseViewController<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,DataSourceDelegate>
{
    UITextField* searchTextField;
    BOOL isDelStyle;
    BOOL isTripEdit;
    
    NSMutableArray* m_ShowAry;
    UITableView* m_tableView;
    
    UIAlertView* baseAlert;
    UILabel* nodataLabel;
    UIView* footSpinnerView;
    NSMutableDictionary* cellstatusDict;
    
    ElementType elementType;
    
    id<AddEventCellProtocol>delegate;
    
    EGORefreshTableHeaderView *refreshHeaderView;
    BOOL _reloading;
    
    BOOL isRefresh;
    NSInteger pageNum;
}

@property (nonatomic,assign)BOOL isDelStyle;
@property (nonatomic,assign)ElementType elementType;
@property (nonatomic,assign)id<AddEventCellProtocol> delegate;
@property (nonatomic,assign)NSMutableArray* m_ShowAry;
@property (nonatomic,retain)NSMutableDictionary* cellstatusDict;

@property (assign, getter = isReloading) BOOL reloading;
@property (nonatomic, readonly) EGORefreshTableHeaderView *refreshHeaderView;

- (id)initWithType:(BOOL)Style edit:(BOOL)isEdit;
- (void)reloadTableViewDataSource;
- (void)dataSourceDidFinishLoadingNewData:(NSNumber *)loadedData;
- (void)dataSourceDidFailPresentingError;
@end
